function shallowClone1(target){
  if(typeof target === 'object' && target !== 'null'){
    if(Array.isArray(target)){
      return [...target]
    }else{
      return {...target}
    }
  }else{
    return target
  }
}
function shallowClone2(target){
  
  if(typeof target === 'object' && target !== 'null'){
    const result = Array.isArray(target) ? []:{}
    for(let key in target){
      if(target.hasOwnProperty(key)){
        result[key] = deepClone2(target[key])
      }
    }
    return result
  }else{
    return target
  }
  
}